package advance.taskExecutor;

import java.util.concurrent.Executor;

import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @Description: TODO
 * @Author: chris_cai@enable-ets.com
 * @Since: 2018年10月11日
 */
@Configuration
@ComponentScan(basePackages = "advance.taskExecutor")
@EnableAsync
public class TaskExecutorConfig implements AsyncConfigurer {

    //@EnableAsync注解开启对异步任务的支持

    //配置类实现 AsyncConfigurer 接口,并重写 getAsyncExecutor 方法,获取一个基于线程池的 TaskExecutor

    @Override
    public Executor getAsyncExecutor() {
        return null;
    }

    @Override
    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
        return null;
    }


}
